package jsen.tool.ddd.demo.domain.parking.factory;

import jsen.tool.ddd.demo.domain.parking.*;

/**
 * @author jsen
 * @date 2021/10/6
 */
public class ParkingLotFactory {
    public static ParkingLot build() {
        ParkingLotMonitor monitor = ParkingLotMonitor.builder().build();
        monitor.getParkingList().add(Parking.builder().location(Location.builder()
                .x(5).y(5).w(10).h(10).build()).build());

        return ParkingLot.builder().monitor(
                monitor
        ).parkingLotStatus(
                ParkingLotStatus.builder().carCnt(0).busyLocationCnt(0).freeLocationCnt(1).build()
        ).build();
    }
}
